package Chapter07.Homework.H20211022.Work03;

public class Pet {
    private String name;
    private int tili;

    public Pet() {
    }

    public Pet(String name, int tili) {
        this.name = name;
        this.tili = tili;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getTili() {
        return tili;
    }

    public void setTili(int tili) {
        this.tili = tili;
    }

    public void show(){
        System.out.println("猫的姓名"+name+"体力"+tili);
    }
    public void show02(){
        System.out.println("老鼠的姓名"+name+"体力"+tili);
    }
}
